//--------------------------------------------------------------------------------
// This file is a \"Sample\" as from Windows Workflow Foundation
// Samples
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is intended only as a supplement to Microsoft
// Development Tools and/or on-line documentation.  See these other
// materials for detailed information regarding Microsoft code samples.
// 
// THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//--------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Runtime.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Activities;

namespace MNS.Activities
{
    /// <summary>
    /// This class is the toolbox item for the activity.
    /// </summary>
    /// <remarks>
    /// Here I have overridden CreateComponentsCore which is called by Visual Studio when you drag an activity onto the 
    /// designer surface. It's here you get to create the default activities.
    /// </remarks>
    [Serializable]
    internal class IteratorToolboxItem : ActivityToolboxItem
    {
        public IteratorToolboxItem(Type type)
            : base(type)
        {
        }

        private IteratorToolboxItem(SerializationInfo info, StreamingContext context)
        {
            this.Deserialize(info, context);
        }

        //protected override IComponent[] CreateComponentsCore(IDesignerHost host)
        //{
        //    IteratorActivity activity = new IteratorActivity() as IteratorActivity;

        //    //activity.Activities.Add(new ParallelIfBranch());

        //    //var ca = new ReplicatorActivity();
            
        //    //activity.Activities.Add(ca);

        //    //ca.UntilCondition = new CodeCondition(); //new EventHandler<ConditionalEventArgs>(this.CarCondition);
        //    //(ca.UntilCondition as CodeCondition).Condition += new EventHandler<ConditionalEventArgs>(IteratorActivity_Condition);


        //    //activity.Activities.Add(new SequenceActivity());
  
        //    return new IComponent[] { activity };
        //}


    }
}